package com.smart.campus.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.smart.campus.dto.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
    IPage<SysUser> findAll(SysUser sysUser, Page<SysUser> page);

    List<SysUser> getTeachersList();

    List<SysUser> getDetails(@Param(value = "user") SysUser sysUser);

    public IPage<SysUser> pageUser(@Param("sysUser")SysUser sysUser,Page<SysUser> page);

    public void insertUserIdAndDeptId(Map<String,Long> map);

    public void insertUserIdAndRoleId(Map<String,Long> map1);

    public void deleteUserIdAndDeptId(Long userId);

    public void deleteUserIdAndRoleId(Long userId);

    SysUser selectUserDept(Long user_id);
}
